clear all

** Set working directory: please set your own
/*
cd "~/Dropbox/sanctions_replication/"
*/
** Open dataset
use data/survey_clean.dta, clear

* Run the analyses
* Physical sanctions, attitudes and emotions
regr intent_phis_vox_num i.left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num, r
est store vox_phis_attitudes_ideol

* Verbal sanctions, attitudes and emotions
regr intent_verb_vox_num i.left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num, r
est store vox_verbal_attitudes_ideol

* Insult, attitudes and emotions
regr intent_insult_vox_num i.left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num, r
est store vox_insult_attitudes_ideol

* PCA direct sanctions, attitudes and emotions
regr pca_direct i.left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num, r
est store pca_direct_attitudes_ideol

* Deny help, attitudes and emotions
regr intent_deny_vox_num i.left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num, r
est store vox_deny_attitudes_ideol

* Avoid Interaction, attitudes and emotions
regr intent_avoid_vox_num i.left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num, r
est store vox_avoid_attitudes_ideol

* Gossip, attitudes and emotions
regr intent_gossip_vox_num i.left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num, r
est store vox_gossip_attitudes_ideol

* PCA indirect sanctions, attitudes and emotions
regr pca_indirect i.left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num, r
est store pca_indirect_att_ideol

* PCA all sanctions, attitudes and emotions
regr pca_all i.left_right_self pol_interest anger_vox_num disgust_vox_num  ///
fear_vox_num sad_vox_num, r
est store pca_all_attitudes_ideol

* Make table
esttab vox_phis_attitudes_ideol ///
 vox_verbal_attitudes_ideol  vox_insult_attitudes_ideol ///
  pca_direct_attitudes_ideol  vox_gossip_attitudes_ideol ///
 vox_deny_attitudes_ideol  vox_avoid_attitudes_ideol ///
 pca_indirect_att_ideol   pca_all_attitudes_ideol  ///
using tables/tableb9.tex, tex nonumber ///
mtitles("Physical" "Verbal"  "Insult"  "Dir sanct (PCA)" "Gossip"  "Deny help" "Avoid interact" "Ind sanct (PCA)" "All sanctions (PCA)" ) ///
drop(0.left_right_self) ///
coeflabels(1.left_right_self "Left-right self placement: 1" ///
2.left_right_self "Left-right self placement: 2" ///
3.left_right_self "Left-right self placement: 3" ///
4.left_right_self "Left-right self placement: 4" ///
5.left_right_self "Left-right self placement: 5" ///
6.left_right_self "Left-right self placement: 6" ///
7.left_right_self "Left-right self placement: 7" ///
8.left_right_self "Left-right self placement: 8" ///
9.left_right_self "Left-right self placement: 9" ///
10.left_right_self "Left-right self placement: 10" ///
female_dummy "Female (dummy)" age_calculated "Age" college "College" ///
pol_interest "Political interest"  ///
anger_vox_num "Anger" disgust_vox_num "Disgust" fear_vox_num "Fear" sad_vox_num "Sadness" _cons "Constant") se ///
replace addnotes("Standard errors are robust")

